Skip to content

upgrade pitest version and add jvmArg #2126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

tehtea
Copy link
Contributor

@tehtea tehtea commented Mar 26, 2022

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our [issue tracker](https://github.
    com/spring-projects/spring-data-elasticsearch/issues)
    . Add the issue number to the Closes #issue-number line below
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Closes #2125

@pivotal-cla
Copy link

@tehtea Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@tehtea Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 26, 2022
Copy link
Collaborator

@sothawo sothawo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this. Just one question, see in code

pom.xml Outdated
@@ -435,7 +435,7 @@
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.5.2</version>
<version>1.6.4</version>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason not to use the latest version 1.7.5?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, yeah you're right, was only trying 1.6.4 initially since that was the earliest version that worked. Changed it accordingly again, it works fine now

@tehtea
Copy link
Contributor Author

tehtea commented Mar 27, 2022

Smoke test output:

teh@pc spring-data-elasticsearch % ./mvnw org.pitest:pitest-maven:mutationCoverage
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------< org.springframework.data:spring-data-elasticsearch >---------
[INFO] Building Spring Data Elasticsearch 5.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- pitest-maven:1.7.5:mutationCoverage (default-cli) @ spring-data-elasticsearch ---
[WARNING] The artifact xml-apis:xml-apis:jar:2.0.2 has been relocated to xml-apis:xml-apis:jar:1.0.b2
[INFO] Root dir is : /Users/tehtea/spring-data-elasticsearch
[INFO] Found plugin : Default csv report plugin
[INFO] Found plugin : Default xml report plugin
[INFO] Found plugin : Default html report plugin
[INFO] Found plugin : Implicit null check filter
[INFO] Found plugin : Kotlin junk mutations filter
[INFO] Found plugin : Infinite for loop filter
[INFO] Found plugin : Max mutations per class limit
[INFO] Found plugin : Logging calls filter
[INFO] Found plugin : Method reference null check filter
[INFO] Found plugin : Try with resources filter
[INFO] Found plugin : Enum constructor filter
[INFO] Found plugin : Trivial return vals equivalence filter
[INFO] Found plugin : Long running iterator loop filter
[INFO] Found plugin : Inlined finally block filter plugin
[INFO] Found plugin : Record junk mutation filter
[INFO] Found plugin : Excluded annotations plugin
[INFO] Found plugin : Equals shortcut equivalent mutant filter
[INFO] Found plugin : Static initializer code detector plugin
[INFO] Found plugin : Mutant export plugin
[INFO] Found plugin : For each loop filter
[INFO] Found plugin : For loop counter filter
[INFO] Plugin available : Git integration
[INFO] Plugin available : Support for mutating kotlin bytecode
[INFO] Found shared classpath plugin : Default mutation engine
[INFO] Found shared classpath plugin : JUnit 5 test framework support
[INFO] Found shared classpath plugin : JUnit plugin
[INFO] Found shared classpath plugin : TestNG plugin
[INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,RETURN_VALS,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_RETURN_VALUES_MUTATOR,EXPERIMENTAL_SWITCH,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER
[INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath
[INFO] Adding org.pitest:pitest to SUT classpath
[INFO] Mutating from /Users/tehtea/spring-data-elasticsearch/target/classes
[INFO] Defaulting target tests to match packages in test build directory
18:19:03 PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue.
18:19:03 PIT >> INFO : Incremental analysis reduced number of mutations by 0
18:19:03 PIT >> INFO : Created  12 mutation test units in pre scan
18:19:03 PIT >> INFO : MINION : OpenJDK 64-Bit Server VM warning: Option AllowRedefinitionToAddDeleteMethods was deprecated in version 13.0 and will likely be removed in a future release.
18:19:03 PIT >> INFO : Sending 1062 test classes to minion
18:19:03 PIT >> INFO : Sent tests to minion
18:19:05 PIT >> INFO : MINION : java.lang.Error: java.lang.Thread.sleep
18:19:05 PIT >> INFO : MINION :         at org.springframework.data.elasticsearch.blockhound.BlockHoundIntegrationCustomizer.lambda$applyTo$0(BlockHoundIntegrationCustomizer.java:38)
18:19:05 PIT >> INFO : MINION :         at reactor.blockhound.BlockHound$Builder.lambda$install$8(BlockHound.java:427)
18:19:05 PIT >> INFO : MINION :         at reactor.blockhound.BlockHoundRuntime.checkBlocking(BlockHoundRuntime.java:89)
18:19:05 PIT >> INFO : MINION :         at java.base/java.lang.Thread.sleep(Thread.java)
18:19:05 PIT >> INFO : MINION :         at org.springframework.data.elasticsearch.blockhound.BlockHoundTests.lambda$shouldFailIfBlockHoundIsNotInstalled$0(BlockHoundTests.java:40)
18:19:05 PIT >> INFO : MINION :         at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:185)
18:19:05 PIT >> INFO : MINION :         at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271)
18:19:05 PIT >> INFO : MINION :         at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286)
18:19:05 PIT >> INFO : MINION :         at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
18:19:05 PIT >> INFO : MINION :         at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
18:19:05 PIT >> INFO : MINION :         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
18:19:05 PIT >> INFO : MINION :         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
18:19:05 PIT >> INFO : MINION :         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
18:19:05 PIT >> INFO : MINION :         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
18:19:05 PIT >> INFO : MINION :         at java.base/java.lang.Thread.run(Thread.java:833)
18:19:13 PIT >> INFO : MINION : java.lang.Error: java.lang.Thread.sleep
18:19:13 PIT >> INFO : MINION :         at org.springframework.data.elasticsearch.blockhound.BlockHoundIntegrationCustomizer.lambda$applyTo$0(BlockHoundIntegrationCustomizer.java:38)
18:19:13 PIT >> INFO : MINION :         at reactor.blockhound.BlockHound$Builder.lambda$install$8(BlockHound.java:427)
18:19:13 PIT >> INFO : MINION :         at reactor.blockhound.BlockHoundRuntime.checkBlocking(BlockHoundRuntime.java:89)
18:19:13 PIT >> INFO : MINION :         at java.base/java.lang.Thread.sleep(Thread.java)
18:19:13 PIT >> INFO : MINION :         at org.springframework.data.elasticsearch.blockhound.BlockHoundTests.lambda$shouldFailIfBlockHoundIsNotInstalled$0(BlockHoundTests.java:40)
18:19:13 PIT >> INFO : MINION :         at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:185)
18:19:13 PIT >> INFO : MINION :         at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271)
18:19:13 PIT >> INFO : MINION :         at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286)
18:19:13 PIT >> INFO : MINION :         at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
18:19:13 PIT >> INFO : MINION :         at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
18:19:13 PIT >> INFO : MINION :         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
18:19:13 PIT >> INFO : MINION :         at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
18:19:13 PIT >> INFO : MINION :         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
18:19:13 PIT >> INFO : MINION :         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
18:19:13 PIT >> INFO : MINION :         at java.base/java.lang.Thread.run(Thread.java:833)                                                                                 -18:19:23 PIT >> INFO : Calculated coverage in 19 seconds.
18:19:23 PIT >> INFO : Incremental analysis reduced number of mutations by 0
18:19:23 PIT >> INFO : Created  12 mutation test units                                                                                                                     |18:19:42 PIT >> INFO : Completed in 39 seconds
================================================================================
- Mutators
================================================================================
> org.pitest.mutationtest.engine.gregor.mutators.ConditionalsBoundaryMutator
>> Generated 5 Killed 3 (60%)
> KILLED 3 SURVIVED 2 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 0 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.returns.PrimitiveReturnsMutator
>> Generated 12 Killed 4 (33%)
> KILLED 4 SURVIVED 1 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 7 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.VoidMethodCallMutator
>> Generated 28 Killed 0 (0%)
> KILLED 0 SURVIVED 27 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 1 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanTrueReturnValsMutator
>> Generated 17 Killed 1 (6%)
> KILLED 1 SURVIVED 8 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 8 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.returns.NullReturnValsMutator
>> Generated 33 Killed 27 (82%)
> KILLED 27 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 6 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.MathMutator
>> Generated 7 Killed 0 (0%)
> KILLED 0 SURVIVED 7 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 0 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.returns.EmptyObjectReturnValsMutator
>> Generated 16 Killed 16 (100%)
> KILLED 16 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 0 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.returns.BooleanFalseReturnValsMutator
>> Generated 14 Killed 9 (64%)
> KILLED 9 SURVIVED 0 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 5 
--------------------------------------------------------------------------------
> org.pitest.mutationtest.engine.gregor.mutators.NegateConditionalsMutator
>> Generated 34 Killed 27 (79%)
> KILLED 27 SURVIVED 7 TIMED_OUT 0 NON_VIABLE 0 
> MEMORY_ERROR 0 NOT_STARTED 0 STARTED 0 RUN_ERROR 0 
> NO_COVERAGE 0 
--------------------------------------------------------------------------------
================================================================================
- Timings
================================================================================
> pre-scan for mutations : < 1 second
> scan classpath : < 1 second
> coverage and dependency analysis : 19 seconds
> build mutation tests : < 1 second
> run mutation analysis : 19 seconds
--------------------------------------------------------------------------------
> Total  : 39 seconds
--------------------------------------------------------------------------------
================================================================================
- Statistics
================================================================================
>> Line Coverage: 176/223 (79%)
>> Generated 166 mutations Killed 87 (52%)
>> Mutations with no coverage 27. Test strength 63%
>> Ran 394 tests (2.37 tests per mutation)
Enhanced functionality available at https://www.arcmutate.com/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  40.523 s
[INFO] Finished at: 2022-03-27T18:19:42+08:00
[INFO] ------------------------------------------------------------------------

@sothawo sothawo merged commit 1407d4d into spring-projects:main Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Unsupported class file major version 60" Error when running mutation test
4 participants